/**
 * Created by seeker910 on 2018/5/10.
 *
 * 住房专项资金缴存
 */
Rsd.define('Rsd.Faith.dialogs.FiscalJiaoCunDialog', {
    extend: 'Rsd.container.Dialog',
    requires: ['Rsd.controlEx.ModelViewer'],
    xtype:'jiaocun-dialog',
    width:800,
    height:600,
    title:'住房维修专项资金缴存',
    layout:'border',
    isNew:false,
    items:[
        {
            xtype:'model-viewer',
            legend:'房屋信息',
            region:'center',
            height:250,
            readOnly:true,
            fields:[
                {label:{content:'房屋编号',width:100},name:'FangWuBianHao',width:350 ,readOnly:true},
                {label:{content:'小区',width:100},name:'XiaoQuBianHao',width:350},
                {label:{content:'栋号',width:100},name:'LouDongHao',width:350},
                {label:{content:'层高',width:100},name:'CengGao',width:350},
                {label:{content:'单元',width:100},name:'DanYuanHao',width:350},
                {label:{content:'性质',width:100},name:'XingZhi',width:350},
                {label:{content:'室号',width:100},name:'ShiHao',width:350},
                {label:{content:'建筑面积',width:100},name:'JianZhuMianJi',width:350},
                {label:{content:'缴费标准',width:100},name:'JiaoFeiBiaoZhun',width:350 ,
                    "xtype": "combobox-enum",
                    enum:'Rsd.Faith.Core.ShouFeiBiaoZhunZZ'},
                {label:{content:'应缴金额',width:100},name:'YinJiaoJinE',width:350}
            ]
        },
        {
            xtype:'model-viewer',
            region:'top',
            legend:'发票信息',
            height:220,
            readOnly:false,
            fields:[
                {label:{content:'发票号',width:100},name:'FaPiaoHaoMa',width:350},
                {label:{content:'发票金额',width:100},name:'JinE',width:350},
                {label:{content:'开票人',width:100},name:'KaiPiaoRen',width:350},
                {label:{content:'开票日期',width:100},name:'KaiPiaoReQi',width:350},
                {label:{content:'缴费标准',width:100},name:'JiaoFeiBiaoZhun',width:350}
            ]
        },

        {
            region:'bottom',
            height:100,
            style:{fontSize:'120%',left:'50px'},
            items:[
                {xtype:'button',height:60,margin:'20 0 0 0',width:150,text:'确 定 缴 存',handler:'btn_ok'}
            ]
        }
    ],

    /*
     *
     * */
    constructor: function constructor(config) {
        config = config || {};
        this.apply(config);
        this.items[0].readOnly = (this.isNew==false);
    },
    load:function load(row) {

        this.items[0].loadData(row);
        this.items[1].loadData({});
    },
    btn_ok:function btn_ok() {
        Rsd.popup('缴存成功');
        if(this.isNew)
        {
            //fiscal.CreateAccount
        }
        this.close();
    }
});